<?php require_once(dirname(__FILE__) . '/inc/config.inc.php');
IsModelPriv('weblink'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>订单详情</title>
    <link href="templates/style/admin.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="templates/js/jquery.min.js"></script>
    <script type="text/javascript" src="templates/js/getuploadify.js"></script>
    <script type="text/javascript" src="templates/js/checkf.func.js"></script>
    <script type="text/javascript" src="plugin/calendar/calendar.js"></script>
</head>
<body>
<?php
$row = $dosql->GetOne("SELECT a.*,b.title FROM `#@__goods_order` a left join `#@__goods` b on a.goods_id=b.id WHERE a.id=$id");
$stats = ['未付款', '已付款', '待使用', '已使用', '已过期', '已发起退款', '退款已通过', '退款已驳回'];
$type = ['外卖','团购','其他'];
?>
<div class="formHeader"><span class="title">订单详情</span> <a href="javascript:location.reload();" class="reload">刷新</a>
</div>

<table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
    <tr>
        <td height="40" align="right">订单号：</td>
        <td><input type="text"  class="input" value="<?php echo $row['ordernum']; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">用户id：</td>
        <td><input type="text"  class="input" value="<?php echo $row['u_id']; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">商品id：</td>
        <td><input type="text"  class="input" value="<?php echo $row['title']; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">商户id：</td>
        <td><input type="text"  class="input" value="<?php echo $row['shop_id']; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">用户头像：</td>
        <td><img style="width: 50px;height: 50px;"  src="<?php echo $row['u_avatar']; ?>" >
    </tr>
    <tr>
        <td height="40" align="right">用户名称：</td>
        <td><input type="text"  class="input" value="<?php echo $row['u_name']; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">手机号：</td>
        <td><input type="text"  class="input" value="<?php echo $row['mobile']; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">数量：</td>
        <td><input type="text"  class="input" value="<?php echo $row['number']; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">单价：</td>
        <td><input type="text"  class="input" value="<?php echo $row['Price']; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">订单金额：</td>
        <td><input type="text"  class="input" value="<?php echo $row['money']; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">支付方式：</td>
        <td><input type="text"  class="input" value="微信支付" disabled>
    </tr>
    <tr>
        <td height="40" align="right">订单状态：</td>
        <td><input type="text"  class="input" value="<?php echo isset($stats[$row['state']])?$stats[$row['state']]:'其他'; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">下单时间：</td>
        <td><input type="text"  class="input" value="<?php echo date('Y-m-d H:i:s', intval($row['time'])); ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">订单备注：</td>
        <td><input type="text"  class="input" value="<?php echo $row['remarks']; ?>" disabled>
    </tr>
    <tr>
        <td height="40" align="right">订单类型：</td>
        <td><input type="text"  class="input" value="<?php echo isset($type[$row['order_type']])?$type[$row['order_type']]:'其他'; ?>" disabled>
    </tr>

</table>

</body>
</html>